-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(opensearch-sink) Setting 'insecure' should override 'cert' #5268
bug(opensearch-sink) Setting 'insecure' should override 'cert' #5268
Conversation
Signed-off-by: Jan Høydahl <[email protected]>
e9797f2
to
2a58b26
Compare
@@ -118,7 +118,7 @@ Default is null. | |||
|
|||
- `aws_sts_header_overrides`: An optional map of header overrides to make when assuming the IAM role for the sink plugin. | |||
|
|||
- `insecure`: A boolean flag to turn off SSL certificate verification. If set to true, CA certificate verification will be turned off and insecure HTTP requests will be sent. Default to `false`. | |||
- `insecure`: A boolean flag to turn off SSL certificate verification. If set to true, CA certificate verification will be turned off and insecure HTTP requests will be sent. Setting this will override any `cert` configured. Default to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the same documentation clarification on the source side as on the sink side. Peeking in the configuration code for source, it appears that insecure: true
already overrides cert
, so this is just a clarification.
builder = builder.withInsecure(insecure); | ||
// Insecure == true will override configured certPath | ||
if (insecure) { | ||
builder.withInsecure(insecure); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found no way to log a warning if both options are configured at the same time, so this is just a silent override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @janhoy for this contribution to the project!
Signed-off-by: Jan Høydahl <[email protected]> Signed-off-by: Josh Crean <[email protected]>
Description
This PR flips the precedence between
cert
andinsecure
config options so thatinsecure: true
overrides the presence ofcert
.Issues Resolved
Resolves #5267
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.